<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <script src="https://unpkg.com/vue@2.7.14/dist/vue.js"></script>
    <script src="https://unpkg.com/axios@1.5.1/dist/axios.min.js"></script>
    <title>Document</title>
    <style>
        .red {
            background: #ed4843;
        }

        .blue {
            background: #3c5b9b;
        }

        .ball {
            width: 30px;
            height: 30px;
            border-radius: 50%;
            display: flex;
            justify-content: center;
            align-items: center;
            border: 1px solid #EFEFEF;
            color: white;
            position: relative;
            font-weight: bold;
        }

        .table {
            text-align: center;
        }
    </style>
</head>

<body>
    <div id="app">
        <table border="1" cellspacing="0" style="width: 100%;" class="table">
            <tr>
                <td>ID</td>
                <td>红球</td>
                <td>蓝球</td>
            </tr>
            <tr v-for="item in list">
                <td>{{item.id}}</td>
                <td style="display: flex;justify-content: center;gap: 6px;">
                    <div v-for="item in item.red" class="ball red">{{item}}</div>
                </td>
                <td>
                    <div class="ball blue">{{item.blue}}</div>
                </td>
            </tr>
        </table>
    </div>

    <script>
        new Vue({
            el: "#app",
            data: {
                aa: 123,
                list: []
            },
            async mounted() {
                const { data } = await axios.get("https://651cde1835bd4107e373316b.mockapi.io/api/v1/lotto/");
                this.list = data
            }
        })
    </script>
</body>

</html>